package org.nbict.iot.task.realtime.filter;

import org.apache.storm.trident.operation.BaseFilter;
import org.apache.storm.trident.tuple.TridentTuple;

/**
 * Created by songseven on 18/6/25.
 */
public class AuthFilter extends BaseFilter {
    @Override
    public boolean isKeep(TridentTuple tuple) {
        Integer action =  tuple.getInteger(1);
        if (action == 1 || action == 4) {
//            System.out.println("auth filter => " + action);
            return true;
        }
        return false;
    }
}
